package com.jnevision.user.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.jnevision.util.DateUtil;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author gavin
 * @since 2019-07-13
 */
@TableName("sys_user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class User extends Model<User> {
    private static final long serialVersionUID = 5736339818624694233L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @TableField("name")
    private String name;

    @TableField("password")
    private String password;

    /**
     * 电话
     */
    @TableField("phone")
    private String phone;

    /**
     * 头像
     */
    @TableField("avatar")
    private String avatar;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private String createTime = DateUtil.getNormalTime();

    /**
     * 人脸识别码
     */
    @TableField("face_code")
    private String faceCode;

    /**
     * 入职时间
     */
    @TableField("entry_time")
    private String entryTime;

    /**
     * 离职时间
     */
    @TableField("leavedate")
    private String leavedate;

    /**
     * 性别
     */
    @TableField("sex")
    private String sex;

    /**
     * 职务
     */
    @TableField("job")
    private String job;

    /**
     * 现居地
     */
    @TableField("current_residence")
    private String currentResidence;

    /**
     * 家乡
     */
    @TableField("hometown")
    private String hometown;

    /**
     * 工龄
     */
    @TableField("works_year")
    private Integer worksYear;

    /**
     * 年龄
     */
    @TableField("age")
    private Integer age;

    /**
     * 员工编号
     */
    @TableField("emp_num")
    private String empNum;

    /**
     * 学历
     */
    @TableField("education")
    private String education;

    /**
     * 建立劳动关系时间
     */
    @TableField("hire_time")
    private String hireTime;

    /**
     * 身份证号
     */
    @TableField("ID_card_no")
    private String idCardNo;

    /**
     * 是否签约
     */
    @TableField("is_signing")
    private Boolean signing;

    /**
     * 是否交纳保险
     */
    @TableField("is_insurance")
    private Boolean insurance;

    @TableField("is_valid")
    // @TableLogic
    private Boolean valid;

    @TableField("is_annual_salary")
    private Boolean annualSalary;

    @TableField("political_status")
    private Integer politicalStatus;
    @TableField("professional")
    private String professional;
    @TableField("order_num")
    private Integer orderNum;
    @TableField("is_manager")
    private Boolean manager;

    @TableField(exist = false)
    private Integer deptId;
    @TableField(exist = false)
    private Integer roleId;
    @TableField(exist = false)
    private String deptName;
    // 打卡状态
    @TableField(exist = false)
    private String cardStatus;

    @TableField(exist = false)
    private String salary;

    @TableField(exist = false)
    private String start;
    @TableField(exist = false)
    private String end;

    public Integer getPoliticalStatus() {
        return politicalStatus;
    }

    public void setPoliticalStatus(Integer politicalStatus) {
        this.politicalStatus = politicalStatus;
    }

    public String getProfessional() {
        return this.professional;
    }

    public void setProfessional(String professional) {
        this.professional = professional;
    }

    public String getSalary() {
        return this.salary;
    }

    public void setSalary(String salary) {
        this.salary = salary;
    }

    public String getCardStatus() {
        return this.cardStatus;
    }

    public void setCardStatus(String cardStatus) {
        this.cardStatus = cardStatus;
    }

    public String getDeptName() {
        return this.deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getFaceCode() {
        return faceCode;
    }

    public void setFaceCode(String faceCode) {
        this.faceCode = faceCode;
    }

    public String getEntryTime() {
        return entryTime;
    }

    public void setEntryTime(String entryTime) {
        this.entryTime = entryTime;
    }

    public String getLeavedate() {
        return leavedate;
    }

    public void setLeavedate(String leavedate) {
        this.leavedate = leavedate;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getCurrentResidence() {
        return currentResidence;
    }

    public void setCurrentResidence(String currentResidence) {
        this.currentResidence = currentResidence;
    }

    public String getHometown() {
        return hometown;
    }

    public void setHometown(String hometown) {
        this.hometown = hometown;
    }

    public Integer getWorksYear() {
        return worksYear;
    }

    public void setWorksYear(Integer worksYear) {
        this.worksYear = worksYear;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getEmpNum() {
        return empNum;
    }

    public void setEmpNum(String empNum) {
        this.empNum = empNum;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getHireTime() {
        return hireTime;
    }

    public void setHireTime(String hireTime) {
        this.hireTime = hireTime;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }

    public Boolean isSigning() {
        return signing;
    }

    public void setSigning(Boolean signing) {
        this.signing = signing;
    }

    public Boolean isInsurance() {
        return insurance;
    }

    public void setInsurance(Boolean insurance) {
        this.insurance = insurance;
    }

    public Boolean isValid() {
        return valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    public Boolean isAnnualSalary() {
        return annualSalary;
    }

    public void setAnnualSalary(Boolean annualSalary) {
        this.annualSalary = annualSalary;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Integer getOrderNum() {
        return this.orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public Boolean isManager() {
        return this.manager;
    }

    public void setManager(Boolean manager) {
        this.manager = manager;
    }

    @Override
    public String toString() {
        return "User{" + "id=" + id + ", name=" + name + ", password=" + password + ", phone=" + phone + ", avatar="
            + avatar + ", createTime=" + createTime + ", faceCode=" + faceCode + ", entryTime=" + entryTime
            + ", leavedate=" + leavedate + ", sex=" + sex + ", job=" + job + ", currentResidence=" + currentResidence
            + ", hometown=" + hometown + ", worksYear=" + worksYear + ", age=" + age + ", empNum=" + empNum
            + ", education=" + education + ", hireTime=" + hireTime + ", idCardNo=" + idCardNo + ", signing=" + signing
            + ", insurance=" + insurance + ", valid=" + valid + "}";
    }

    public Integer getDeptId() {
        return this.deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public Integer getRoleId() {
        return this.roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

}